package com.zheng.umbrella.dao.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class UmbrellaHardwareUmbrella implements Serializable {
    /**
     * 编号
     *
     * @mbg.generated
     */
    private Integer id;

    /**
     * 雨伞类型
     *
     * @mbg.generated
     */
    private Integer type;

    /**
     * 雨伞编码
     *
     * @mbg.generated
     */
    private String code;

    /**
     * 批次号
     *
     * @mbg.generated
     */
    private String batchCode;

    /**
     * 雨伞名称
     *
     * @mbg.generated
     */
    private String name;

    /**
     * 雨伞芯片id
     *
     * @mbg.generated
     */
    private String chipNumber;

    /**
     * 所属机器
     *
     * @mbg.generated
     */
    private String machineCode;

    /**
     * 所属代理
     *
     * @mbg.generated
     */
    private Integer agentId;

    /**
     * 成本价
     *
     * @mbg.generated
     */
    private BigDecimal costprice;

    /**
     * 市场价
     *
     * @mbg.generated
     */
    private BigDecimal marketprice;

    /**
     * 租赁方式
     *
     * @mbg.generated
     */
    private Integer leasehold;

    /**
     * 状态
     *
     * @mbg.generated
     */
    private Integer ustatus;

    /**
     * 最近一次租出
     *
     * @mbg.generated
     */
    private Date lastRentalTime;

    /**
     * 租用次数
     *
     * @mbg.generated
     */
    private Integer rentingCount;

    /**
     * 备注
     *
     * @mbg.generated
     */
    private String description;

    /**
     * 是否逻辑删除
     *
     * @mbg.generated
     */
    private Integer flag;

    /**
     * 创建人
     *
     * @mbg.generated
     */
    private String cuser;

    /**
     * 创建时间
     *
     * @mbg.generated
     */
    private Long ctime;

    /**
     * 当前雨伞所在设备编码
     *
     * @mbg.generated
     */
    private String currentMachineCode;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getBatchCode() {
        return batchCode;
    }

    public void setBatchCode(String batchCode) {
        this.batchCode = batchCode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getChipNumber() {
        return chipNumber;
    }

    public void setChipNumber(String chipNumber) {
        this.chipNumber = chipNumber;
    }

    public String getMachineCode() {
        return machineCode;
    }

    public void setMachineCode(String machineCode) {
        this.machineCode = machineCode;
    }

    public Integer getAgentId() {
        return agentId;
    }

    public void setAgentId(Integer agentId) {
        this.agentId = agentId;
    }

    public BigDecimal getCostprice() {
        return costprice;
    }

    public void setCostprice(BigDecimal costprice) {
        this.costprice = costprice;
    }

    public BigDecimal getMarketprice() {
        return marketprice;
    }

    public void setMarketprice(BigDecimal marketprice) {
        this.marketprice = marketprice;
    }

    public Integer getLeasehold() {
        return leasehold;
    }

    public void setLeasehold(Integer leasehold) {
        this.leasehold = leasehold;
    }

    public Integer getUstatus() {
        return ustatus;
    }

    public void setUstatus(Integer ustatus) {
        this.ustatus = ustatus;
    }

    public Date getLastRentalTime() {
        return lastRentalTime;
    }

    public void setLastRentalTime(Date lastRentalTime) {
        this.lastRentalTime = lastRentalTime;
    }

    public Integer getRentingCount() {
        return rentingCount;
    }

    public void setRentingCount(Integer rentingCount) {
        this.rentingCount = rentingCount;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public String getCuser() {
        return cuser;
    }

    public void setCuser(String cuser) {
        this.cuser = cuser;
    }

    public Long getCtime() {
        return ctime;
    }

    public void setCtime(Long ctime) {
        this.ctime = ctime;
    }

    public String getCurrentMachineCode() {
        return currentMachineCode;
    }

    public void setCurrentMachineCode(String currentMachineCode) {
        this.currentMachineCode = currentMachineCode;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", type=").append(type);
        sb.append(", code=").append(code);
        sb.append(", batchCode=").append(batchCode);
        sb.append(", name=").append(name);
        sb.append(", chipNumber=").append(chipNumber);
        sb.append(", machineCode=").append(machineCode);
        sb.append(", agentId=").append(agentId);
        sb.append(", costprice=").append(costprice);
        sb.append(", marketprice=").append(marketprice);
        sb.append(", leasehold=").append(leasehold);
        sb.append(", ustatus=").append(ustatus);
        sb.append(", lastRentalTime=").append(lastRentalTime);
        sb.append(", rentingCount=").append(rentingCount);
        sb.append(", description=").append(description);
        sb.append(", flag=").append(flag);
        sb.append(", cuser=").append(cuser);
        sb.append(", ctime=").append(ctime);
        sb.append(", currentMachineCode=").append(currentMachineCode);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UmbrellaHardwareUmbrella other = (UmbrellaHardwareUmbrella) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getBatchCode() == null ? other.getBatchCode() == null : this.getBatchCode().equals(other.getBatchCode()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getChipNumber() == null ? other.getChipNumber() == null : this.getChipNumber().equals(other.getChipNumber()))
            && (this.getMachineCode() == null ? other.getMachineCode() == null : this.getMachineCode().equals(other.getMachineCode()))
            && (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId()))
            && (this.getCostprice() == null ? other.getCostprice() == null : this.getCostprice().equals(other.getCostprice()))
            && (this.getMarketprice() == null ? other.getMarketprice() == null : this.getMarketprice().equals(other.getMarketprice()))
            && (this.getLeasehold() == null ? other.getLeasehold() == null : this.getLeasehold().equals(other.getLeasehold()))
            && (this.getUstatus() == null ? other.getUstatus() == null : this.getUstatus().equals(other.getUstatus()))
            && (this.getLastRentalTime() == null ? other.getLastRentalTime() == null : this.getLastRentalTime().equals(other.getLastRentalTime()))
            && (this.getRentingCount() == null ? other.getRentingCount() == null : this.getRentingCount().equals(other.getRentingCount()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getFlag() == null ? other.getFlag() == null : this.getFlag().equals(other.getFlag()))
            && (this.getCuser() == null ? other.getCuser() == null : this.getCuser().equals(other.getCuser()))
            && (this.getCtime() == null ? other.getCtime() == null : this.getCtime().equals(other.getCtime()))
            && (this.getCurrentMachineCode() == null ? other.getCurrentMachineCode() == null : this.getCurrentMachineCode().equals(other.getCurrentMachineCode()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getBatchCode() == null) ? 0 : getBatchCode().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getChipNumber() == null) ? 0 : getChipNumber().hashCode());
        result = prime * result + ((getMachineCode() == null) ? 0 : getMachineCode().hashCode());
        result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode());
        result = prime * result + ((getCostprice() == null) ? 0 : getCostprice().hashCode());
        result = prime * result + ((getMarketprice() == null) ? 0 : getMarketprice().hashCode());
        result = prime * result + ((getLeasehold() == null) ? 0 : getLeasehold().hashCode());
        result = prime * result + ((getUstatus() == null) ? 0 : getUstatus().hashCode());
        result = prime * result + ((getLastRentalTime() == null) ? 0 : getLastRentalTime().hashCode());
        result = prime * result + ((getRentingCount() == null) ? 0 : getRentingCount().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getFlag() == null) ? 0 : getFlag().hashCode());
        result = prime * result + ((getCuser() == null) ? 0 : getCuser().hashCode());
        result = prime * result + ((getCtime() == null) ? 0 : getCtime().hashCode());
        result = prime * result + ((getCurrentMachineCode() == null) ? 0 : getCurrentMachineCode().hashCode());
        return result;
    }
}